export default {
    //banner--列表
    loadBannerMgtServer(params, callback) {
        Vue.http.get('/banner/listpage.json', { params: params }).then(function(response) {
            callback(response.data);
        });
    },
    //banner-- 添加
    addBannerServer(params, callback_success, callback_error) {
        Vue.http.post('/banner/add.json', params).then(response => {
            callback_success(response.data);
        }, response => {
            callback_error(response.data)
        });
    },
    //banner-- 编辑
    updateBannerServer(params, callback_success, callback_error) {
        Vue.http.put('/banner/modify.json', params).then(response => {
            callback_success(response.data);
        }, response => {
            callback_error(response.data)
        });
    },
    //banner-- 撤回
    revokeBannerServer(params, callback) {
        Vue.http.put('/banner/revoke.json', { id: params }).then(response => {
            callback(response.data);
        });
    },
    //banner-- 发布
    publishBannerServer(params, callback) {
        Vue.http.put('/banner/publish.json', { id: params }).then(response => {
            callback(response.data);
        });
    },
    //banner-- 删除
    deleteBannerServer(params, callback) {
        Vue.http.delete('/banner/delete.json', { params: params }).then((response) => {
            callback(response.data)
        }, (response) => {});
    },
    //banner--获取发布位置列表
    publishBannerPositionServer(callback) {
        Vue.http.get('/banner/position/listdata.json').then(response => {
            callback(response.data);
        });
    },
  //banner--添加--原生页面下拉
  loadNativeSelectServer(callback) {
    Vue.http.get('/banner/type/listdata.json').then(function(response) {
      callback(response.data);
    });
  },

  //短信充值
  loadMessageCharge(params, callback) {
    Vue.http.post('/sms/msgRecharge.json', params).then(function(response) {
      callback(response.data);
    });
  },
  //充值记录列表
  loadMessageRecordList(params, callback) {
    Vue.http.get('/sms/recharge/listPage.json', { params: params }).then(function(response) {
      callback(response.data);
    });
  },
  //客户列表
  loadMessageCustome(params, callback) {
    Vue.http.get('/sms/listPage.json', { params: params }).then(function(response) {
      callback(response.data);
    });
  },
}
